package ooday05;

public class StaticDemo {
    public static void main(String[] args) {
        aoo o1 = new aoo();
        aoo o2 = new aoo();
        o2.show();



    }
}
    class aoo {
    int x ;
    static int y;
    public aoo(){
        x++;
        y++;
    }
    public void show(){
        System.out.println(x+","+y);
    }
    }
    class A{

        static{
            System.out.println("静态代码块");
        }
        public A(){
            System.out.println("构造方法");
        }
        {
            System.out.println("代码块");
        }
    }
    class B extends A{
        {
            System.out.println("B代码块");
        }
        static{
            System.out.println("B静态代码块");
        }
        public B(){
            System.out.println("B构造方法");
        }
    }